package com.bole.dao;

import com.bole.pojo.DicBrandDo;
import com.bole.pojo.DicImgTypeDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Transactional
public interface DicBrandDao extends JpaRepository<DicBrandDo, Long> {

    @Modifying
    @Query(value = "delete  from DicBrandDo t where  t.id in (:idss) ")
    void deleteBatch( @RequestParam("idss") List<Long> idss);

    List<DicBrandDo> findAllByFirstChar(@RequestParam("firstChar")String firstChar);


}
